/*
 * @Author: Starfish_DL
 * @Date: 2020-10-08 00:21:20
 * @LastEditors: Starfish_DL
 * @LastEditTime: 2020-10-08 00:46:25
 * @CurrentVersion: 1.0
 * @Description: 
 */

public class Kids extends ManKind {
    private int yearsOld;
    public void printAge() {
        System.out.println(yearsOld);
    }
    public Kids(int sex,int salary,int old) {
        super(sex, salary);
        if (old>=0) {
            this.yearsOld=old;
        } else {
            System.out.println("设置错误,已为您自动设置为0");
            this.yearsOld=0;
        }
    }
    // public void employeed() {
    //     System.out.println("Kids should study and no job.");
    // }
    public void employeed() {
        super.employeed();
        System.out.println("but Kids should study and no job.");
    }
    public static void main(String[] args) {
        Kids someKids=new Kids(1, 0, 14);
        someKids.employeed();
        someKids.manOrWorman();
    }
}
